Lazy Functions as Processes
نویسنده
چکیده
CPS transforms have long been important tools in the study of programming languages, especially those related to the λ-calculus. Recently, it has been shown that encodings into process calculi, such as the π-calculus, can also serve as semantics, in the same way as CPS transforms. It is known that common encodings of the call-byvalue and call-by-name λ-calculi into the π-calculus can be seen as CPS transforms composed with a naming transform that expresses sharing of values. We review this analysis and extend it to call-by-need. The new call-by-need CPS transform requires extending the target λ-calculus with an effect, which we call constructive update. We present a proof of the correctness of the call-by-need CPS transform, which is hence a new proof of the correctness of the call-by-need π-calculus encoding. Also, we derive abstract machines from the CPS transforms discussed.
منابع مشابه
Process annotations and process types
In a concurrent functional language processes are functions that are executed concurrently. Using special annotations based on lazy copying arbitrary dependencies between these functions can be used to specify arbitrary networks of processes. The communication and synchronization between the processes is realized using the lazy evaluation principle without any additional communication primitves...
متن کاملارائه مدلی غیرپارامتریک با استفاده از تکنیک k- نزدیکترین همسایه در برآورد جرم مخصوص ظاهری خاک
Soil bulk density measurements are often required as an input parameter for models that predict soil processes. Nonparametric approaches are being used in various fields to estimate continuous variables. One type of the nonparametric lazy learning algorithms, a k-nearest neighbor (k-NN) algorithm was introduced and tested to estimate soil bulk density from other soil properties, including soil ...
متن کاملI-dialogue: Modeling Agent Conversation by Streams and Lazy Evaluation
This paper defines and exemplifies a new computational abstraction called i-dialogue which aims to model communicative situations such as those where an agent conducts multiple concurrent conversations with other agents. The i-dialogue abstraction is inspired both by the dialogue abstraction proposed by [17] and by the STROBE model [4]. Idialogue models conversations among processes by means of...
متن کاملAn Investigation into Functions as Processes
In Mil90] Milner examines the encoding of the-calculus into the-calculus MPW92]. The former is the universally accepted basis for computations with functions, the latter aims at being its counterpart for computations with processes. The primary goal of this paper is to continue the study of Milner's encodings. We focus mainly on the lazy-calculus Abr87]. We show that its encoding gives rise to ...
متن کاملStricti cation of Lazy Functions
This papers describes a transformation from lazy functions into e cient non-lazy ones. The functions we study perform multiple traversals over a data structure. Our transformation performs a global analysis of the calling structure of a set of mutually recursive lazy-functions in order to transform them into sets of functions which must be called in sequence. Many of the resulting functions can...
متن کاملA Technique for Doing Lazy Evaluation in Logic
D We develop a natural technique for defining functions in logic, i.e. PROLOG, which directly yields lazy evaluation. Its use does not require any change to the PROLOG interpreter. Function definitions run as PROLOG programs and so run very efficiently. It is possible to combine lazy evaluation with nondeterminism and simulate coroutining. It is also possible to handle infinite data structures ...
متن کامل